<template>
  <div class='list'>
    <ul>
      <li v-for="(item, index) in listData" :key="index">
        <p class="switch-box">
          <img class="logo" :src="item.student.wx_pic" alt="">
          <span v-if="search.state!=1"><van-switch v-model="item.isPassed" active-color="#00998d" /><span class="pr">{{item.isPassed?"通过":"不通过"}}</span></span>
          <span v-else class="fr color-green pr">通过</span>
        </p>
        <p class="clearB"><span class="name pr">{{item.student.name}}</span></p>
        <p class="clearB"><span>班级：{{item.student.class}}</span><span class="fr">学号：{{item.student.number}}</span></p>
        <p class="clearB"><span>奖励类型：{{item.type | formaltType}}</span><span class="fr">年度: {{item.years||"暂无"}}</span></p>
        <p class="clearB"><span>奖励级别: {{item.rank||"暂无"}}</span><span class="fr">奖励分: {{item.score||"暂无"}}</span></p>
        <p class="clearB imgs"><span>图片材料：</span><img :src="item.pic" alt="" @click="showBigImg(item.pic)"></p>
      </li>
    </ul>
    <p class="no-data" v-show="listData.length==0">暂时没有数据</p>
  </div>
</template>
<script>
export default {
  props:['search','listData','routerDetail'],
  components: {},
  name: "",
  data() {
    return {};
  },
  filters:{
    formaltType(val){
      return ['奖学金', '奖励', '称号', '论文', '专利'][val]||"暂无"
    }
  },
  methods: {
    /**
     * @name 预览
     */
    showBigImg(url){
      ImagePreview([url])
    }
  },
  created() {}
};
</script>
<style lang="scss" scoped>
@import "./scss/list.scss";
</style>